package com.foreknow.demo6;

public class Swallow extends Bird {

    public Swallow(String name) {
        super(name);
    }

    public void fly(){
        System.out.println(name+"正在飞.....");
    }
    public void simp(){
        System.out.println(name+"，没有你我怎么活啊！");
    }

    public static void main(String[] args) {
        Bird b = new Bird();
        b.name = "鸟";
        b.color = "白";
        b.eat();
        System.out.println("---------------");
        Swallow swallow = new Swallow("tom");
        swallow.name = "燕子";
        swallow.color = "黑色";
        swallow.fly();
        swallow.simp();
    }
}
